Configurable speech recognition system using a pronunciation alignment between multiple recognizers

ABSTRACT

Techniques for combining the results of multiple recognizers in a distributed speech recognition architecture. Speech data input to a client device is encoded and processed both locally and remotely by different recognizers configured to be proficient at different speech recognition tasks. The client/server architecture is configurable to enable network providers to specify a policy directed to a trade-off between reducing recognition latency perceived by a user and usage of network resources. The results of the local and remote speech recognition engines are combined based, at least in part, on logic stored by one or more components of the client/server architecture.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application claims priority to U.S. Provisional Application No.61/430,907 filed Jan. 7, 2011 which is incorporated herein by reference.

BACKGROUND

In recent years, the availability of voice interfaces for electronicdevices using automated speech recognition (ASR) has become more common.Voice interfaces enable a user to use speech including voice commands tointeract with one or more components of an electronic device. Forexample, a user may interact with a speech-enabled cellular phone toeffectuate voice activated dialing or the user may interact with aspeech enabled device to compose and send a text message. The additionof voice control as a separate input interface provides users with moreflexible communication options when using electronic devices and reducesthe reliance on other input devices such as mini keyboards and touchscreens that may be more cumbersome to use in particular situations.

SUMMARY

One embodiment is directed to methods and apparatus for combining speechrecognition results from a local recognizer and a network-basedrecognizer processing the same audio of different qualities. Forexample, the audio transmitted to and recognized by the network-basedrecognizer may be compressed and/or degraded.

Another embodiment is directed to methods and apparatus for combiningspeech recognition results from multiple recognizers using a prioriweights assigned to each recognizer, wherein the a priori weights aredetermined based on the recognizer's anticipated proficiency performingparticular recognition task(s).

Another embodiment is directed to a distributed ASR environmentcomprising local- and network-based recognizers. In the distributed ASRenvironment, local speech recognition may be facilitated by using userand/or device-specific knowledge source(s) (e.g., contact lists, recentcalls, etc.) that may not be available to the network-based recognizer.For example, the user and/or device specific knowledge source(s) may beused to constrain the grammar used by the local ASR engine and/or toconstrain the recognition vocabulary used by the local ASR engine.

Another embodiment is directed to a distributed ASR environmentcomprising local- and network-based recognizers. In the distributed ASRenvironment, recognition by the local ASR engine may be improved bytraining the local ASR engine using results frequently returned from thenetwork ASR engine.

Another embodiment is directed to a distributed ASR environmentcomprising local and network-based recognizers configured to performparallel speech recognition. Because the result from the local ASRengine may be faster, a partial action (e.g., opening up a text messageeditor) may be performed based on local ASR result, and the action maybe completed (e.g., filling in the message body text) when thenetwork-based ASR result is received. By performing a partial action,the user may be able to determine whether the recognition by the localASR engine was correct prior to receiving the full result from thenetwork ASR engine.

Another embodiment is directed to identifying multiple types ofinformation (e.g., command type, name, location, message body) in singleuser utterance without directed prompts to recognize the utterance usinga distributed speech recognition system where different parts of theutterance are processed by different recognizers.

Another embodiment is directed to determining at run-time whether anetwork-based recognizer is needed for speech recognition by identifyinga generic speech node in one or more active recognition grammar(s) beingused by a local speech recognition engine. For example, all nodes in asearch tree for the active grammar(s) may be used to determine alikelihood that the network-based recognizer is needed rather thanrelying on an a priori decision about where to send audio.

Another embodiment is directed to reducing perceived user latencycaused, at least in part, by a delay in sending audio to the network ASRengine. The perceived user latency is reduced by simultaneouslyperforming local ASR while buffering the audio in a compressed form sothat the compressed audio is ready for transmission to the network assoon as it is determined, based on the local ASR, that network-based ASRis required. That is, the audio data may be prepared to be sent to thenetwork ASR prior to establishing that the network ASR will be requiredfor speech recognition.

Another embodiment is directed to configuring a speech recognitionsystem operation such as usage of network resources or perceived userlatency based on a policy specified by a network provider. For example,a determination regarding when to establish and/or close a networkconnection and/or when to send audio to network ASR engine may be based,at least in part on the policy specified by a network provider.

BRIEF DESCRIPTION OF DRAWINGS

The accompanying drawings are not intended to be drawn to scale. In thedrawings, each identical or nearly identical component that isillustrated in various figures is represented by a like numeral. Forpurposes of clarity, not every component may be labeled in everydrawing. In the drawings:

FIG. 1 is a block diagram of a client/server architecture in accordancewith some embodiments of the invention;

FIG. 2 is a flow chart of a method for recognizing speech received by aclient device using multiple recognizers in accordance with someembodiments of the invention;

FIG. 3 is a flow chart of a method for routing speech to differentrecognizers in accordance with some embodiments of the invention;

FIG. 4 is a flow chart of a method for managing a network connectionbased on a network provider policy in accordance with some embodimentsof the invention;

FIGS. 5A and 5B are exemplary grammars that may be activated by anembedded ASR engine in accordance with some embodiments of theinvention; and

FIG. 6 is an exemplary computer system that may be used in connectionwith some embodiments of the invention.

DETAILED DESCRIPTION

When a speech-enabled electronic device receives speech input from auser, an ASR engine is often used to process the input speech todetermine what the user has said. An electronic device may include anembedded ASR that performs speech recognition locally on the device. TheApplicants have recognized that some advantages of performing localspeech recognition include that delays need not be incurred intransferring audio to another device to be processed and receiving ASRresults and that the audio signal can be processed locally and not bedegraded by transmission to a remote device. However, due to someelectronic devices' limitations regarding processing power and/or memorystorage, ASR of user utterances often is performed remotely from thedevice (e.g., by one or more networked servers). The larger memoryand/or processing resources often associated with server ASRimplementations may facilitate speech recognition by providing a largerdictionary of words that may be recognized and/or by using more complexspeech recognition models than can be done on the local device. TheApplicants have appreciated that these benefits may be offset by thefact that the audio and the ASR results must be transmitted (e.g., overa network) which may cause speech recognition delays at the deviceand/or degrade the quality of the audio signal.

Some embodiments of the invention are directed to combining the speechrecognition capabilities of an embedded ASR system and a remote (e.g.,server) ASR system to perform speech recognition by focusing on thestrengths provided by each type of system. Such a hybrid speechrecognition system may provide accurate results in a more timely mannerthan either an embedded or server ASR system when used independently.

An exemplary hybrid speech recognition (SR) system 100 in accordancewith some embodiments of the invention is illustrated in FIG. 1. HybridSR system 100 includes an electronic device 102 that is configured toreceive speech via voice input interface 104. Electronic device 102 maybe any speech-enabled electronic device, examples of which include acellular phone, smart phone, personal digital assistant (PDA), laptopcomputer, tablet computer, or handset device. This list is notexhaustive, as the aspects of the invention described herein can be usedwith any type of electronic device. An exemplary voice input interface104 may be a microphone, e.g., manufactured as part of electronic device102 or externally connected to an input jack of electronic device 102.Electronic device 102 may also include one or more other user interfaceinputs 106 that enable a user to interact with electronic device 102.For example, other inputs 106 may include, but are not limited to, akeyboard, a touch screen, and one or more buttons or switches connectedto electronic device 102. Input speech received via voice inputinterface 104 may be encoded and stored in input buffer 108. Forexample, incoming audio may be encoded using Pulse Code Modulation(PCM), which digitally represents the sampled input audio signal.However, it should be appreciated that incoming audio may be encoded andstored in any other suitable format, as the aspects of the inventiondescribed herein are not limited in this respect.

Electronic device 102 may include embedded ASR engine 110 configured toperform speech recognition on audio stored in input buffer 108. EmbeddedASR engine 110 may be configured to perform speech recognition on theaudio stored in input buffer 108 using one or more acoustic models,language models and/or speech recognition techniques, as aspects of theinvention are not limited in any way by the specific implementation ofthe embedded ASR engine. Electronic device 102 may include one or morestorage devices 112 configured to store one or more dictionaries orvocabularies that embedded ASR engine may access to facilitate speechrecognition. For example, in some embodiments, storage 112 may include aphoneme dictionary that stores phoneme to grapheme conversioninformation to enable embedded ASR engine 110 to map stored audio to atextual representation. In some embodiments, storage 112 may store aplurality of voice commands that electronic device 102 is configured torecognize such as “call,” “text,” etc. and the embedded ASR engine 110may access the stored voice commands as part of a speech recognitionprocess. Storage 112 may also include personal information associatedwith one or more users of electronic device 102. For example, storage112 may include a contact list, recent call list, task list, calendarinformation, or any other information associated with electronic device102 and/or a user of electronic device 102. In some embodiments,embedded ASR engine 110 may be configured to access at least some of thestored personal information to facilitate speech recognition. Forexample, the entries in a contact list on a cell phone may be used byembedded ASR engine 110 to restrict the possible recognition resultsfollowing the commands “call,” “dial,” or “text.”

Additionally, electronic device 102 may include one or more processors114 configured to execute a plurality of computer-readable instructionsstored, for example, in storage 112. For example, electronic device 102may be a smartphone configured to display a user interface and includesone or more processors 114 that may execute computer-readableinstructions that, when executed, present a user interface and determinehow to interpret user interactions with the user interface. It should beappreciated that processor(s) 114 may perform any other suitableprocessing functions including, but not limited to, determining when tosend audio to a remote ASR engine and combining speech recognitionresults from embedded ASR engine 110 and a remote ASR, as described inmore detail below.

Exemplary hybrid SR system 100 also includes one or more remote ASRengines 122 connected to electronic device 102 via any suitablecommunication medium, which is shown in FIG. 1 as a network 120 (whichmay be a wireless and/or wired network), that is not limited in thisrespect. Remote ASR engine(s) 122 may be configured to perform speechrecognition on audio received from one or more electronic devices suchas electronic device 102 and to return the ASR results to thecorresponding electronic device. In some embodiments, audio transmittedfrom electronic device 102 to remote ASR engine(s) 122 may be compressedprior to transmission to ensure that the audio data fits in the datachannel bandwidth of network 120. In addition to storing encoded inputaudio (e.g., encoded using PCM) in input buffer 108, some embodimentsalso store audio compressed (e.g., by vocoder 116) in output buffer 118.Vocoder 116 may be a compression codec that is optimized for speech ortake any other form. For example, the compressed audio in output buffer118 may be the output of a digital signal processing (DSP) component ofelectronic device 102 that is used to compress audio data for sendingvoice calls over a voice channel of a mobile telephone network. In someelectronic devices 102, access to hardware compression of audio from theDSP may not be made available to application providers or vendors thatprovide the ASR capability for the electronic device. In someembodiments that may be used with such electronic devices, the encodedaudio stored in input buffer 108 may be used in combination with one ormore software encoding methods (e.g., executing on processor(s) 114) toprovide compressed audio that may be transmitted to remote ASR engine(s)for speech recognition processing. Any other suitable compressionprocess may be also be used and embodiments of the invention are notlimited by any particular compression method.

Electronic device 102 may also include network interface 119 configuredto establish a network connection with remote ASR engine(s) 122 overnetwork 120. For example, network interface 119 may be configured toopen a network socket in response to receiving an instruction toestablish a network connection with remote ASR engine(s) 122. Asillustrated in FIG. 1, remote ASR engine(s) 122 may be connected to oneor more remote storage devices 124 that may be accessed by remote ASRengine(s) 122 to facilitate speech recognition of the audio datareceived from electronic device 102. In some embodiments, remote storagedevice(s) 124 may be configured to store larger speech recognitionvocabularies and/or more complex speech recognition models that thoseemployed by embedded ASR engine 110, although the particular informationstored by remote storage device(s) 124 does not limit embodiments of theinvention. Although not illustrated in FIG. 1, remote ASR engine(s) 122may include other components that facilitate recognition of receivedaudio including, but not limited to, a vocoder for decompressing thereceived audio and/or compressing the ASR results transmitted back toelectronic device 102. Additionally, in some embodiments remote ASRengine(s) 122 may include one or more acoustic or language modelstrained to recognize audio data received from a particular type ofcodec, so that the ASR engine(s) may be particularly tuned to receiveaudio processed by those codecs.

Rather than relying on either the embedded ASR or the remote ASR toprovide the entire speech recognition result for an audio input (e.g.,an utterance), some embodiments of the invention use both the embeddedASR and the remote ASR to process portions or all of the same inputaudio, either simultaneously or with the ASR engine(s) 122 lagging dueto the transmission time. The results of multiple recognizers may thenbe combined to facilitate speech recognition and/or to effectuate acollective action corresponding to the recognized input speech. To thisend, some embodiments are directed to processing audio received by anelectronic device at least partially in parallel by multiple recognizersand consolidating the recognition results into one or more unifiedactions that application(s) executing on the electronic device shouldtake in response to the received audio.

In the illustrative configuration shown in FIG. 1, a single electronicdevice 102 and ASR engine 122 is shown. However it should be appreciatedthat in some embodiments, a larger network is contemplated that mayinclude multiple (e.g., hundreds or thousands or more) or electronicdevices serviced by any number of ASR engines. As one illustrativeexample, the aspects of the present invention described herein may beused to provide and ASR capability to a mobile telephone serviceprovider thus the techniques described herein can be used to provide ASRcapabilities to an entire customer base for a mobile telephone serviceprovider or any portion thereof.

FIG. 2 provides an exemplary process for processing of input audio usinga hybrid client/server SR architecture as described above in connectionwith the system of FIG. 1, where the client ASR is provided by theembedded ASR engine 110 and the server ASR is provided by the remote ASRengine(s) 122. In act 210, audio is received by a client device such aselectronic device 102. Audio received by the client device may be splitinto two processing streams that are recognized by respective local andremote ASR engines as described previously. For example, after receivingaudio at the client device, the process proceeds to act 220 where theaudio is streamed to an embedded recognizer on the client device and inact 222, the embedded recognizer performs speech recognition on theaudio. In some embodiments, as audio data is being received and encodedin an input buffer, an embedded recognizer may begin a recognitionprocess of the encoded audio prior to detecting the end of the inputspeech. However, in other embodiments, input speech may be encoded andstored in an input buffer until the end of speech is detected and inresponse to detecting the end of speech, the embedded recognizer maybegin performing speech recognition on the encoded audio.

After the embedded recognizer performs at least some speech recognitionof the received audio, the process proceeds to act 224 where aconfidence level associated with the recognition results is determinedin any suitable manner. In some embodiments, confidence levels or valuesmay be categorized into high, mixed, and low categories, although itshould be appreciated that any other suitable number of categories mayalso be used. Additionally, the threshold values that are used to definedifferent confidence level categories may depend on particularimplementations of the embedded ASR, and embodiments of the inventionare not limited in this respect. Furthermore, in some embodiments, thethreshold values used to define different confidence categories maychange if the speech recognition capabilities of the differentrecognizers change (e.g., improve) over time.

If it is determined in act 224 that the speech recognition results ofthe embedded processor are associated with a high confidence value, theprocess proceeds to act 226 where a full action based on the speechrecognition results is performed. For example, if the embedded ASRengine determines that the user said “Call Mike” with a high level ofconfidence, the recognized command “call” may invoke the action ofopening an application for making a phone call. Additionally, it may bedetermined whether a phone number for the recognized name “Mike” existsin a contact list stored on the client device. If such a phone number isfound, the phone call application may dial the phone number associatedwith Mike to initiate the phone call. In some instances, the user maynot have provided enough information to initiate a full action. Forexample, an entry for “Mike” in the contact list of an electronic devicemay include multiple phone numbers for “Mike” and the input speech “CallMike” may not be sufficient to determine which of the phone numbers tocall. If more input is required from a user, the user may be prompted toprovide the additional information to complete the action. For example,the user may be prompted with “Home or Cell?” to distinguish between ahome phone number and a cell phone number associated with “Mike.”

In some embodiments, if it is determined in act 224 that a confidencevalue associated with the embedded speech recognition results is high, anetwork connection to a server recognizer (if one has been establishedbased upon criteria discussed below) may be terminated because theserver recognizer results may not be required to perform the action.However, in other embodiments, the network connection to the serverrecognizer (if established) may not be terminated in response todetermining that a high confidence value is associated with an embeddedspeech recognition result. Rather, the recognition results from theserver recognizer may be used to verify that the result determined bythe embedded recognizer was correct. In some embodiments, in the eventthat it is determined that the embedded recognizer was not correct, oneor more thresholds associated with the confidence categories may beupdated to reduce the likelihood that future actions will be invokedbased on input speech misrecognized by the embedded recognizer, althoughall aspects of the invention are not limited in this respect.

If it is determined in act 224 that the confidence value associated withthe embedded ASR results is mixed (i.e., there is high confidence inrecognition of part but not all of an audio input), the process proceedsto act 228 where a partial action is performed based on the embedded ASRresults. For example, if the user utterance is “Text Mom I'll be home ateight,” it may be determined with a high confidence that the command“Text” and the recipient “Mom” were properly recognized by the embeddedASR engine, but that the remaining information to include in the body ofthe text message may be associated with a low confidence value. In thisexample, the electronic device may perform a partial action by opening atext messaging application and filling in the recipient field withinformation associated with “Mom” as stored by a contact list in theelectronic device. However, the message body for the text message may beleft blank pending the receipt of the speech recognition results fromthe server recognizer.

After receiving the server recognition results at the electronic device,the process proceeds to act 230, where the electronic device parses theportion of the input speech from the server recognition results that wasdetermined to have a low confidence value. Parsing may be performed inany suitable way. For example, an application executing on the clientdevice may use word timings, word alignment, or pronunciation alignmentof the embedded ASR result and the server result to determine whichportion of the results received from the server correspond to theportion associated with low confidence from the embedded ASR.

Continuing with the example above, the low confidence part correspondsto the portion of the audio following “Mom.” After determining the partof the server recognition results that corresponds to the low confidenceportion of the embedded recognition results, the process proceeds to act232, where the partial action initiated in act 228 is completed based,at least in part, on the speech recognition results of the serverrecognizer. For example, the server recognizer may have determined thatthe low confidence part of the input speech corresponds to “I'll be homeat 8.” Accordingly, text corresponding to this recognized portion of theinput speech may be entered into the message body of the text messageopened by a text messaging application in act 228. In some embodiments,one or more applications executing on the client device may beconfigured to manage the results of the embedded ASR engine andcommunicate with corresponding one or more applications executing on theserver. By initiating partial actions, a user may be able to quicklydetermine whether the initial recognition by the embedded ASR engine wascorrect by observing the results of the partial action performed inresponse to a mixed confidence determination (e.g., opening a textapplication and populating the field with “Mom”). Thus, if the systemerred in its determination of the intended action, the user canimmediately abort in any suitable way and retry, rather than awaitingthe full results from the ASR server.

In some embodiments, the system may be configured to cope with delays inthe availability of server results due to network or other processinglatency. One configuration would incorporate a timeout such that theclient would skip to initiating a full action 226 if delays in 242 or244 exceed the specified timeout.

In some embodiments, the server recognition results may be used to trainthe embedded recognizer to improve the recognition performance of theembedded recognizer. Training of the embedded recognizer based on theserver recognizer results may be performed in any suitable manner. Insome embodiments, the client device and/or the server may store one ormore statistics detailing the usage of pronunciations or grammaticalforms spoken by a user of the client device. For example, a user mayfrequently say the phrase “find coffee near me.” In this example, theembedded ASR may return mixed confidence results with the command name“find” being recognized with high confidence by the embedded ASR, whilethe content “coffee near me” has low confidence and is subsequentlyrecognized by the server ASR. For some frequently occurring inputspeech, a grammar associated with the embedded recognizer may be updatedto include the server result so that the embedded ASR is trained andable to recognize with high confidence the entire input speech, therebyenabling the client device to quickly initiate a full action withouthaving to rely on receiving results from the server.

If it is determined in act 224 that the confidence value associated withthe embedded recognition result is low, the process proceeds to act 234,where the electronic device waits to receive the result from the serverrecognizer. When the server result is received from the serverrecognizer, the process proceeds to act 236, where a full action isinitiated based on the server result or a combination of the embeddedrecognizer result and the server result. In some embodiments, the serverresult may be trusted over the embedded recognizer result, which may bediscarded when it is determined in act 224 that the confidence valueassociated with the embedded recognizer result is low. Accordingly, thefull action initiated in act 236 may be based entirely on the resultreturned from the server recognizer. However, in other embodiments, eventhough the embedded recognizer result was associated with a lowconfidence value, at least a portion of the embedded recognizer resultmay be trusted more than the server result. For example, as noted above,in some embodiments the embedded recognizer may have access to personalinformation such as a contact list stored on the electronic device thatthe server recognizer may not have access to. Thus, an embeddedrecognition result for a name of a contact in the contact list may betrusted more than the server result for the contact name despite thefact that a low confidence value was associated with the embeddedrecognition result. Aspects of the invention are not limited in thisrespect, as the embedded and server ASR results may be combined in anysuitable manner.

As described above, when audio is received by the client device in act210, the audio may be streamed to both the client recognizer in act 220and the server recognizer in act 240. In some embodiments, opening of anetwork connection to the server may be initiated when audio is receivedand in act 240, the audio may be streamed to the server recognizer assoon as the network connection is opened between the client device andthe server recognizer. For example, the incoming audio may be compressedand stored in an output buffer and as soon as a network connection isestablished between the client device and the server recognizer, thecompressed audio may be read out of the output buffer and may betransmitted to the server recognizer for recognition. In otherembodiments discussed below, compressed audio may be transmitted to theserver recognizer only after the client device detects the end of theinput speech or some other event occurs. In such embodiments, the clientdevice may compress the audio and store the compressed audio in anoutput buffer until the particular event occurs.

After the audio is streamed to the server recognizer, the processproceeds to act 242 where the server recognizer performs speechrecognition of the received audio. In some embodiments, the serverrecognizer will perform speech recognition on the entire received audio.However, aspects of the invention are not limited in this respect. Inother embodiments, the client device may also send to the serverconfidence levels from the embedded ASR, and the server recognizer mayonly perform recognition on parts of the received audio that theembedded recognizer has associated with a low confidence value. Theprocess then proceeds to act 244 where the server result is provided tothe client device over the network. As described earlier, in someembodiments, when it is determined in act 224 that the embeddedrecognizer result is associated with a mixed or low confidence value,the server result returned to the client device may be used in whole orin part to complete or initiate an action in response to the recognizedinput speech.

The Applicants have recognized and appreciated that streaming audio to aserver over a network costs network bandwidth (e.g., over a voicechannel and/or a data channel) and it may be preferable in someimplementations to delay streaming of the audio to the server until itis determined that the recognition by the server ASR will be needed.Accordingly, in some embodiments, audio may be streamed to the serverrecognizer at a delay compared to when the embedded recognizer processesthe input audio. In some embodiments, a determination that serverrecognition is required may be based, at least in part, on adetermination that the confidence value associated with results of theembedded ASR is below a predetermined threshold value.

In some embodiments, the determination of when to stream audio to aserver recognizer may be based, at least in part, on one or morepolicies specified by an administrator of the communications networkover which the audio is being streamed. For example, a mobile telephonenetwork provider may define a policy that balances the tradeoff betweenlatency for receiving speech recognition results from the server and theconsumption of network bandwidth in transmitting audio to the server andreceiving results. If the policy indicates a willingness to accept someincreased latency to save bandwidth, in some embodiments audio may bestreamed to a server over the mobile telephone network only after it isdetermined that the embedded recognizer in the mobile telephone cannotrecognize the input speech with sufficient accuracy. A different mobiletelephone network provider may define a different policy that specifiesthat reduced latency is more important than reducing the usage ofnetwork bandwidth. When implemented with embodiments of the invention,this policy may cause audio associated with the input speech to bestreamed to both the embedded recognizer and the server recognizer priorto a determination of the confidence value associated with the embeddedrecognizer results (e.g., as soon as possible after the audio isreceived and perhaps even before the full input is received). Any policybetween the two extremes also is possible. In this way, hybridclient/server architectures in accordance with embodiments of theinvention enable network providers more flexibility to tailor networkusage based on providers' preferences than can be achieved inclient-only or server-only ASR solutions.

In some embodiments, the results of the embedded recognizer may betransmitted to the server recognizer in addition to streaming the audiodata as discussed above. In some embodiments, the embedded ASR resultsmay be used to constrain one or more aspects of the speech recognitionprocess performed by the server ASR.

The server ASR may perform speech recognition using different grammarstailored for recognizing different types of user utterances and theembedded ASR results may be used by the server ASR to select anappropriate grammar. For example, the server ASR may use a web searchgrammar for recognizing speech associated with web searches and amessaging grammar for recognizing speech associated with text messages.Since the embedded ASR may have a high proficiency in recognizingcommands (e.g., “Text,” “Search,” “Call,” etc.), in some embodiments,the server recognizer may trust the command portion of the embedded ASRresults to select a grammar to facilitate recognition of the encodedaudio.

In some embodiments, some information stored on the client device (e.g.,contact list) may be transmitted to the server so that it can be used tofacilitate ASR operations on the server. However, in other embodiments,certain information stored on client devices may not be transmitted to aserver recognizer due to privacy concerns. For example, some users maynot want their full contact list to be sent across a network and storedby a server. Although a full contact list (or other personal informationstored on the client device) may not be transmitted to the server, insome embodiments, the embedded ASR results transmitted to the serverrecognizer may be used to add new vocabulary, such as a list of topnames recognized by the client device, to a grammar to facilitate speechrecognition by the server ASR.

As described above, some embodiments are directed to conserving networkresources by opening a network connection between a client device and aserver recognizer only when it is determined that recognition by theserver ASR is required. An exemplary process for managing a networkconnection between a client device and a server recognizer isillustrated in FIG. 3. In act 310, audio corresponding to input speechis received by the client device. The process then proceeds to act 314where the input audio is encoded (e.g., as PCM data) and stored in aninput buffer to enable an embedded ASR engine to perform speechrecognition on the encoded audio.

In some embodiments, an interface between the embedded ASR and thenative audio system of the client device supports capturing both encodedaudio data (e.g., PCM audio data) in act 314 for use by the embedded ASRengine and compressed audio data from a DSP in the client device fortransmission over a network connection to the server. However, someclient devices do not support access to both the input buffer of a DSPwhere the encoded audio data may be stored and the output buffer of theDSP where the compressed audio data may be stored. Capturing both theencoded audio and the compressed audio eliminates the need to compressthe audio in software, thereby helping to minimize the delay intransmitting the compressed audio data to the server recognizer over thenetwork. Additionally, capturing both audio buffers from the DSP reducesthe load on the one or more processors of the client device, which mayenable the client device to use higher accuracy recognition models forthe same processor load. However, it should be appreciated that not allembodiments are directed to capturing different types of audio for useby the embedded and server ASRs.

In some embodiments, after audio is received by the client device in act312, the process also proceeds to act 316 where it is determined whetherthe native audio system of the client device has access to both theinput and output buffers of a DSP included in the device. For example,the input buffer may be the input buffer in which the input audio isencoded and stored in act 314. The client device may include a DSP witha vocoder configured to compress the input audio for transmission over anetwork connection and the compressed audio may be stored in an outputbuffer of the DSP. If it is determined in act 316 that the native audiosystem of the client device has access to the input and output buffersof the DSP, the process proceeds to act 318 where the audio compressedby the DSP is captured and in act 320 the captured compressed audio isstored in an output buffer for later transmission over a network to theserver. If it is determined in act 316 that the client device does notsupport access to both the audio input and output buffers of the DSP,the process proceeds to act 322 where the audio is compressed usingsoftware (e.g., software provided specifically to support the hybrid ASRtechniques described herein) to provide the vocoded data. After softwarecompression, the process proceeds to act 320 where the compressed datais stored in an output buffer for later transmission over a network. Insome embodiments, in act 320 the compressed audio is stored in first-infirst-out (FIFO) storage, while the captured encoded audio data isprovided to the embedded ASR engine to begin recognition. By bufferingthe compressed audio in a FIFO (or other storage), audio data that maybe transmitted to the server ASR may be prepared prior to knowing iftransmission to the server will be needed, thereby reducing thelatencies associated with transmitting the data to the server once thenetwork connection is established.

Some embodiments are directed to enabling a network provider to balancea tradeoff between minimizing network latency and reducing usage ofnetwork resources by defining a policy that configures the operation ofopening and closing a network connection in a client/serverarchitecture. Delays in establishing a network connection may resultfrom several factors. For example, the network may not always be activeat all times and/or at all locations, causing a delay in accessing thenetwork. If the client device is a cell phone or smartphone thatcommunicates over a mobile telephone network, the process ofestablishing a network connection may involve one or more messagestransmitted between a network interface of the client device and a celltower to negotiate the establishment of a data channel to transmit thecompressed audio. On slower networks, this negotiation may take betweenfive and ten seconds to complete before a network connection can beestablished. In some embodiments, compressed audio is stored in anoutput buffer on the client device and the compressed audio istransmitted to a server ASR engine as soon as a network connection isestablished.

Referring back to the process illustrated in FIG. 3, while the embeddedASR of a client device performs speech recognition in act 324, processcontrol proceeds to act 326 where it is determined whether recognitionby the server ASR will be employed. In some embodiments, thedetermination of whether server recognition will be employed may bebased, at least in part, on a policy defined by a network providerrelated to balancing recognition latency with network bandwidth usage,as described in more detail with regard to FIG. 4.

In act 410, a network provider policy is determined One or morepreferences for establishing a network connection in accordance with thenetwork provider policy may be stored on the client device and thesepreferences may be consulted to determine whether the policy related tominimizing recognition result latency, minimizing the use of networkresources (e.g., bandwidth), or some combination of balancing latencyand bandwidth. After retrieving information about the network providerpolicy, process control continues to act 412 where it is determinedwhether the policy specifies minimizing latency or network bandwidth.Although act 412 is shown as being a binary choice between latency andbandwidth minimization policies, it should be appreciated that somepolicies that may be used in accordance with embodiments of theinvention may not be exclusively devoted to minimizing latency orbandwidth. Rather, some policies may try to balance both latency andbandwidth (or some other aspect of the network connection) by using adifferent combination of rules not explicitly described herein. Itshould be appreciated that such types of policies may also be used withsome embodiments of the invention and embodiments are not limited in theparticular policies that may be specified or by whom (e.g., by a networkprovider).

If it is determined in act 412 that the policy focuses on reducingoverall recognition latency, the process proceeds to act 414, where anetwork connection is opened as soon as possible to enable the clientdevice to transmit compressed audio data to a server ASR engine over thenetwork. For example, some client devices may include a button forenabling a speech input device such as a microphone to receive speechinput. In some embodiments, a network connection may be opened inresponse to the user activating the button enabling speech input. Inother embodiments, a network connection may be opened in response todetecting the start of input speech by a user, or in any other suitableway.

In some embodiments, even though the policy (e.g., specified by thenetwork provider) may focus on minimizing latency, the Applicants haverecognized and appreciated that the use of network resources may stillbe minimized in such a configuration by evaluating the types of tasksassociated with an active recognition grammar being used by the embeddedASR.

The Applicants have recognized that some speech recognition tasks may beadequately handled by an embedded ASR engine of a client device, whereasother speech recognition tasks may benefit more from using a server ASRengine. For example, in some embodiments, the embedded ASR may be ableto recognize speech associated with command and control tasks andvoice-activated dialing (VAD) tasks, while the server ASR may berequired or preferred for other types of tasks such as dictation tasksor the content of a search query, text, etc. It should be appreciatedthat this breakdown of tasks for client versus server ASR is merelyexemplary and the particular set of tasks that may be appropriatelyhandled by an embedded ASR and a server ASR may depend on thecapabilities of the ASRs in a specific implementation.

Continuing with the exemplary process of FIG. 4, after a networkconnection has been opened, the process proceeds to act 416 where one ormore active recognition grammars of the embedded ASR engine areanalyzed. FIG. 5 illustrates two illustrative grammars that may beactivated by the embedded ASR engine in response to input speechreceived by a client device. FIG. 5A illustrates a exemplary phone callgrammar that has been activated in response to recognizing the command“Call” or “Dial.” Once the phone call grammar is activated, a searchtree associated with the remaining types of items in the grammar to berecognized may be considered to determine whether the server ASR will benecessary to complete the action associated with the input speech. Thatis, the process of FIG. 4 proceeds to act 418 where it is determinedwhether the active grammar(s) include only tasks that the embedded ASRcan handle. In the exemplary phone call grammar shown in FIG. 5A, all ofthe remaining types of information (e.g., phonebook names, phonebooklabels) are restricted to items that the embedded ASR engine may beconfigured to recognize. Thus, regardless of whether the user says“Call,” “Call Mike,” or “Call Mike cell” the remaining items in thegrammar may all be recognized by the embedded ASR engine without the useof the server ASR engine. Accordingly, it may be determined in act 418that the grammar(s) include only client tasks and the process proceedsto act 420 where the network connection is closed. By closing thenetwork connection as soon as it is determined that the embedded ASRengine can recognize the remaining items in the input speech,over-the-air bandwidth of the network operator may be conserved and theserver ASR may be freed to handle requests for speech recognition fromother client devices as soon as possible.

If it is determined in act 418 that the active recognition grammar doesnot include only client tasks, the process proceeds to act 422 wherecompressed audio data is sent to the server recognizer from an outputbuffer (e.g., a FIFO) of the client device. The process then proceeds toact 430 where the server ASR engine begins speech recognition of thecompressed audio data. An example grammar that includes at least someitems that may not be associated with client tasks is shown in FIG. 5B.The exemplary messaging grammar shown in FIG. 5B includes both an item(phonebook names) that corresponds to a recipient of the text messageand may be recognized by the embedded ASR engine and another item(generic speech) that corresponds to text in a message body of the textmessage and may be best recognized by a server ASR engine (e.g., may beincapable of recognition by the client). A generic speech node in anactive grammar may signify that the input speech may contain dictation(e.g., for text in a message body) that the embedded ASR engine may havea difficult time recognizing or be unable to recognize. Accordingly, insome embodiments, when determining in act 418 if there are only clienttasks in an active recognition grammar of the embedded ASR engine, adetermination may be made if at least one generic speech node exists inthe active grammar, and if so, it may be determined that server tasks inaddition to client tasks remain active in the grammar search tree.

If it is determined in act 412 that the network provider policy isfocused primarily on reducing bandwidth, the process proceeds to act 424where it is determined whether all search paths through the activerecognition grammar(s) include at least one node a server task and thehybrid client/server system may be configured to delay establishing anetwork connection until it is known that the server ASR will berequired. For example, consider the messaging grammar illustrated inFIG. 5B. The embedded ASR engine may recognize the command “Send text”and the messaging grammar of FIG. 5B (and possibly other grammars) maybe activated. However, at this point search paths through the grammarstill exist that do not include nodes corresponding to server tasks. Forexample, the paths that bypass the “generic speech” node do not includetasks that should be performed by the server ASR. Accordingly, if thedetermined network provider policy indicates that bandwidth is to bereduced, it may be determined in act 424 that search paths still existthat do not include a server task node and opening a network connectionmay be delayed. However, after the embedded ASR recognizes “Send textMike,” all remaining paths in the search tree include the generic speechnode corresponding to the message body of the text message (e.g., thegeneric speech node). At this point it may be determined in act 424 thatthe server ASR will be required and process control proceeds to act 426where a network connection is opened. Once the network connection isopened, process control proceeds to act 428 where compressed audio datais sent to the server ASR engine. Process control then proceeds to act430 where the server ASR engine begins performing speech recognition onthe compressed audio.

In some embodiments, the embedded ASR engine of a client device may beconfigured to determine the end of the speech input. After the networkconnection is closed in act 420 or the server ASR begins speechrecognition in act 430, process control returns to act 328 of theprocess illustrated in FIG. 3 where it is determined if the end ofspeech has been detected. If it is determined in act 328 that the end ofspeech has not been detected, process control returns to act 324 whererecognition of the input speech by the embedded ASR (and the server ASR,if applicable) continues. However, if it is determined in act 328 thatthe end of speech has been detected, process control proceeds to act 330where encoding of input audio by the client device is halted. Haltingthe encoding of input audio may avoid sending unnecessary audio datathat includes only silence over the network.

Process control then proceeds to act 332 where any remaining compressedaudio data in the output buffer of the client device is sent to theserver ASR engine to enable the server ASR to complete speechrecognition of the input speech. Once speech recognition is completed bythe server ASR engine, the results are sent back to the client deviceover the network and process control proceeds to act 334 where theembedded ASR results and the server ASR results are combined.

The results from multiple recognizers may be combined in any suitableway including, but not limited to, the methods described above forcombining speech recognition results based on confidence scores or typesof tasks for which particular recognizers are proficient. For example,if mismatched results are returned by the embedded and server ASRengines, in some embodiments, the combined recognition results mayinclude portions of each of the results returned by the embedded andserver ASR engines based, at least in part, on whether the portions areassociated with a task that the recognizer is configured to recognize.Additionally, the server ASR may recognize the entire input audio andthe server results may be used to verify the embedded ASR results.

As described above, in some embodiments, results from multiplerecognizers may be combined using a priori decisions regarding tasksthat each recognizer is believed to perform best. For example, anembedded recognizer may accurately recognize commands, names in acontact list, and locations, whereas a server recognizer may be betterat recognizing web search parameters and dictation such as text messagebodies. This is merely an example, as other divisions of tasks arepossible. In some embodiments, this basic logic for combining theresults from multiple recognizers may be supplemented by additionallogic on the server side and/or the client side that compares therecognition results and allows the embedded ASR result or the server ASRresult to be adopted based on confidence values. Thus, in someembodiments, even if the embedded ASR is tuned to recognize commands,the client device may adopt the server results over the embedded ASRresults if the server results are of sufficiently high confidence.

In some embodiments, results from multiple recognizers may be combinedby taking the full result from either the embedded ASR or the serverASR, although in other embodiments, portions of each of the results frommultiple recognizers may combined to produce the final result.

The Applicants have recognized that previous ASR systems often promptthe user for information to complete an action. This may be due, inpart, to previous ASR systems' inability to identify multiple types ofinformation in a single user utterance and to send the different partsof the utterance to recognizers proficient in performing particularspeech tasks. Accordingly, some embodiments enable a user to speak anentire utterance without directed prompts and to recognized theutterance using a distributed speech recognition system where differentparts of the utterance are processed by different recognizers. Forexample, a user may speak “Text Mike way to go!” and some embodiments ofthe invention may identify “Text” as a command, “Mike” as a name, and“way to go!” as a message body. Each of these portions of the utterancemay then be processed by a recognizer configured to handle theparticular type of information. For example, the command and nameportions may be processed by an embedded recognizer and the message bodyportion may be processed by a server recognizer. It should beappreciated, however, that associations between types of information andrecognizers may be specified in any particular way and theabove-described example is provided merely for illustrative purposes.

An illustrative implementation of a computer system 600 that may be usedin connection with any of the embodiments of the invention describedherein is shown in FIG. 6. The computer system 600 may include one ormore processors 610 and one or more computer-readable non-transitorystorage media (e.g., memory 620 and one or more non-volatile storagemedia 630). The processor 610 may control writing data to and readingdata from the memory 620 and the non-volatile storage device 630 in anysuitable manner, as the aspects of the present invention describedherein are not limited in this respect. To perform any of thefunctionality described herein, the processor 610 may execute one ormore instructions stored in one or more computer-readable storage media(e.g., the memory 620), which may serve as non-transitorycomputer-readable storage media storing instructions for execution bythe processor 610.

The above-described embodiments of the present invention can beimplemented in any of numerous ways. For example, the embodiments may beimplemented using hardware, software or a combination thereof. Whenimplemented in software, the software code can be executed on anysuitable processor or collection of processors, whether provided in asingle computer or distributed among multiple computers. It should beappreciated that any component or collection of components that performthe functions described above can be generically considered as one ormore controllers that control the above-discussed functions. The one ormore controllers can be implemented in numerous ways, such as withdedicated hardware, or with general purpose hardware (e.g., one or moreprocessors) that is programmed using microcode or software to performthe functions recited above.

In this respect, it should be appreciated that one implementation of theembodiments of the present invention comprises at least onenon-transitory computer-readable storage medium (e.g., a computermemory, a floppy disk, a compact disk, a tape, etc.) encoded with acomputer program (i.e., a plurality of instructions), which, whenexecuted on a processor, performs the above-discussed functions of theembodiments of the present invention. The computer-readable storagemedium can be transportable such that the program stored thereon can beloaded onto any computer resource to implement the aspects of thepresent invention discussed herein. In addition, it should beappreciated that the reference to a computer program which, whenexecuted, performs the above-discussed functions, is not limited to anapplication program running on a host computer. Rather, the termcomputer program is used herein in a generic sense to reference any typeof computer code (e.g., software or microcode) that can be employed toprogram a processor to implement the above-discussed aspects of thepresent invention.

Various aspects of the present invention may be used alone, incombination, or in a variety of arrangements not specifically discussedin the embodiments described in the foregoing and are therefore notlimited in their application to the details and arrangement ofcomponents set forth in the foregoing description or illustrated in thedrawings. For example, aspects described in one embodiment may becombined in any manner with aspects described in other embodiments.

Also, embodiments of the invention may be implemented as one or moremethods, of which an example has been provided. The acts performed aspart of the method(s) may be ordered in any suitable way. Accordingly,embodiments may be constructed in which acts are performed in an orderdifferent than illustrated, which may include performing some actssimultaneously, even though shown as sequential acts in illustrativeembodiments.

Use of ordinal terms such as “first,” “second,” “third,” etc., in theclaims to modify a claim element does not by itself connote anypriority, precedence, or order of one claim element over another or thetemporal order in which acts of a method are performed. Such terms areused merely as labels to distinguish one claim element having a certainname from another element having a same name (but for use of the ordinalterm).

The phraseology and terminology used herein is for the purpose ofdescription and should not be regarded as limiting. The use of“including,” “comprising,” “having,” “containing”, “involving”, andvariations thereof, is meant to encompass the items listed thereafterand additional items.

Having described several embodiments of the invention in detail, variousmodifications and improvements will readily occur to those skilled inthe art. Such modifications and improvements are intended to be withinthe spirit and scope of the invention. Accordingly, the foregoingdescription is by way of example only, and is not intended as limiting.The invention is limited only as defined by the following claims and theequivalents thereto.

What is claimed is:
 1. A method of training an embedded speechrecognizer on an electronic device in a distributed speech recognitionsystem comprising the electronic device and a network device having aremote speech recognizer remote from the electronic device, the methodcomprising: recognizing, by the embedded speech recognizer, at least afirst portion of input audio received by the electronic device togenerate a local speech recognition result, wherein the recognizing isperformed, at least in part, using a command grammar activated by theembedded speech recognizer in response to recognizing a command;sending, to the network device, at least a second portion of input audioreceived by the electronic device; receiving, from the network device, aremote speech recognition result corresponding to the at least a secondportion of the input audio; performing, at the electronic device, apronunciation alignment of the local speech recognition result and theremote speech recognition result; identifying, based on the alignedlocal and remote speech recognition results, a portion of the remotespeech recognition result corresponding to a low-confidence part of thelocal speech recognition result; and training the embedded speechrecognizer based, at least in part, on the remote speech recognitionresult, wherein training the embedded speech recognizer comprises addingthe identified portion of the remote speech recognition result to thecommand grammar used by the embedded speech recognizer to recognize theat least a portion of the input audio.
 2. The method of claim 1, whereintraining the embedded speech recognizer further comprises: updating atleast one recognition vocabulary associated with the embedded speechrecognizer based, at least in part, on the remote speech recognitionresult.
 3. The method of claim 2, wherein updating the at least onerecognition vocabulary comprises adding one or more words associatedwith the remote speech recognition result to the at least onerecognition vocabulary.
 4. The method of claim 1, further comprising:determining whether the at least a first portion of the input audiorecognized by the embedded speech recognizer is associated with aconfidence value below a predetermined threshold; wherein sending to thenetwork device, at least a second portion of input audio received by theelectronic device comprises sending, in response to determining that theat least a first portion of the input audio recognized by the embeddedspeech recognizer is associated with a confidence value below apredetermined threshold, the at least a second portion of the inputaudio to the network device for recognition by the remote speechrecognizer.
 5. The method of claim 4, wherein training the embeddedspeech recognizer comprises updating at least one recognition vocabularyassociated with the embedded speech recognizer.
 6. The method of claim1, further comprising: determining, a number of times the remote speechrecognition result has been received from the network device; andtraining the embedded speech recognizer only when the number of timesthe remote speech recognition result has been received from the networkdevice exceeds a predetermined threshold.
 7. The method of claim 1,wherein the command grammar is a call grammar that includes a callcommand node and a call recipient node or a messaging grammar thatincludes a message command node and a message recipient node.
 8. Themethod of claim 1, further comprising: storing one or more statisticsdetailing a usage of pronunciations or grammatical forms spoken by auser of the electronic device, wherein training the embedded speechrecognizer further comprises training the embedded speech recognizerbased, at least in part, on the one or more statistics.
 9. Anon-transitory computer-readable storage medium encoded with a pluralityof instructions that, when executed by at least one processor on anelectronic device in a distributed speech recognition system comprisingthe electronic device having an embedded speech recognizer and a networkdevice having a remote speech recognizer remote from the electronicdevice, perform a method comprising: recognizing, by the embedded speechrecognizer, at least a first portion of input audio received by theelectronic device to generate a local speech recognition result, whereinthe recognizing is performed, at least in part, using a command grammaractivated by the embedded speech recognizer in response to recognizing acommand; sending, to the network device, at least a second portion ofinput audio received by the electronic device; receiving, from thenetwork device, a remote speech recognition result corresponding to theat least a second portion of the input audio; performing, at theelectronic device, a pronunciation alignment of the local speechrecognition result and the remote speech recognition result;identifying, based on the aligned local and remote speech recognitionresults, a portion of the remote speech recognition result correspondingto a low-confidence part of the local speech recognition result; andtraining the embedded speech recognizer based, at least in part, on theremote speech recognition result, wherein training the embedded speechrecognizer comprises adding the identified portion of the remote speechrecognition result to the command grammar used by the embedded speechrecognizer to recognize the at least a portion of the input audio. 10.The computer-readable storage medium of claim 9, wherein training theembedded speech recognizer further comprises: updating at least onerecognition vocabulary associated with the embedded speech recognizerbased, at least in part, on the remote speech recognition result. 11.The computer-readable storage medium of claim 10, wherein updating theat least one recognition vocabulary comprises adding one or more wordsassociated with the remote speech recognition result to the at least onerecognition vocabulary.
 12. The computer-readable storage medium ofclaim 9, wherein the method further comprises: determining, a number oftimes the remote speech recognition result has been received from thenetwork device; and training the embedded speech recognizer only whenthe number of times the remote speech recognition result has beenreceived from the network device exceeds a predetermined threshold. 13.The computer-readable storage medium of claim 9, wherein the methodfurther comprises: determining whether the at least a first portion ofthe input audio recognized by the embedded speech recognizer isassociated with a confidence value below a predetermined threshold;wherein sending to the network device, at least a second portion ofinput audio received by the electronic device comprises sending, inresponse to determining that the at least a first portion of the inputaudio recognized by the embedded speech recognizer is associated with aconfidence value below a predetermined threshold, the at least a secondportion of the input audio to the network device for recognition by theremote speech recognizer.
 14. The computer-readable storage medium ofclaim 9, wherein the command grammar is a call grammar that includes acall command node and a call recipient node or a messaging grammar thatincludes a message command node and a message recipient node.
 15. Thecomputer-readable storage medium of claim 9, wherein the method furthercomprises: storing one or more statistics detailing a usage ofpronunciations or grammatical forms spoken by a user of the electronicdevice, wherein training the embedded speech recognizer furthercomprises training the embedded speech recognizer based, at least inpart, on the one or more statistics.
 16. An electronic device for use ina distributed speech recognition system comprising the electronic deviceand a network device remote from the electronic device, the electronicdevice, comprising: at least one storage device configured to storeinformation associated with input audio spoken by a user of theelectronic device; an embedded speech recognizer configured to recognizeat least a first portion of input audio comprising speech to produce alocal speech recognition result, wherein the recognizing is performed,at least in part, using a command grammar activated by the embeddedspeech recognizer in response to recognizing a command; and at least oneprocessor programmed to: send to the network device, at least a secondportion of input audio received by the electronic device; receive, fromthe network device, a remote speech recognition result corresponding tothe at least a second portion of the input audio; perform apronunciation alignment of the local speech recognition result and theremote speech recognition result; identify, based on the aligned localand remote speech recognition results, a portion of the remote speechrecognition result corresponding to a low-confidence part of the localspeech recognition result; and train the embedded speech recognizerbased, at least in part, on the remote speech recognition result,wherein training the embedded speech recognizer comprises adding theidentified portion of the remote speech recognition result to thecommand grammar used by the embedded speech recognizer to recognize theat least a portion of the input audio.
 17. The electronic device ofclaim 16, wherein training the embedded speech recognizer furthercomprises: updating at least one recognition vocabulary associated withthe embedded speech recognizer based, at least in part, on the remotespeech recognition result.
 18. The electronic device of claim 17,wherein updating the at least one recognition vocabulary comprisesadding one or more words associated with the remote speech recognitionresult to the at least one recognition vocabulary.
 19. The electronicdevice of claim 16, the at least one processor is further programmed to:determine, a number of times the remote speech recognition result hasbeen received from the network device; and train the embedded speechrecognizer only when the number of times the remote speech recognitionresult has been received from the network device exceeds a predeterminedthreshold.
 20. The electronic device of claim 16, wherein the commandgrammar is a call grammar that includes a call command node and a callrecipient node or a messaging grammar that includes a message commandnode and a message recipient node.
 21. The electronic device of claim16, the at least one processor is further programmed to: store one ormore statistics detailing a usage of pronunciations or grammatical formsspoken by a user of the electronic device, wherein training the embeddedspeech recognizer further comprises training the embedded speechrecognizer based, at least in part, on the one or more statistics.